1. Field of the Invention
The present invention relates to a Basic Input/Output System (hereinafter referred to as “BIOS”) and more particularly, to a method for updating and repairing the BIOS.
2. Description of Related Art
A BIOS stored in a flash memory of a motherboard in a current computer system often needs to be updated for reasons such as that it is required to support new hardware or that programming code of the BIOS has errors therein. FIG. 1 is a flowchart illustrating a conventional method of updating BIOS.
Referring to FIG. 1, the method starts with step S100 to update the BIOS with the computer system executing an updating program. The updating program first clears a main BIOS stored in a flash memory in step S110. Next, updated main BIOS is written in the flash memory in step S120. Afterwards, the updating program determines in step S130 whether a boot block of the BIOS has to be updated. If the boot block has to be updated, the boot block in the flash memory is cleared in step S140 and a new boot block is written in the flash memory in step S150. Updating the BIOS is completed in step S160. If in step S130, the updating program determines that it is not required to update the boot block, updating the BIOS is then completed (step S160).
However, during the updating process, the BIOS in the computer system may sometimes be damaged due to update failure caused by computer power outage or system reset. At this point, if the damaged portion belongs to the main BIOS while the boot block remains intact, the user may update the BIOS again through external devices of the computer system.
However, if the damaged portion of the BIOS belongs to the boot block, the BIOS will completely lose functionality and the computer system cannot be booted. When encountering the abovementioned damage to the boot block, the user wishing to remedy the BIOS has to change the flash memory with the damaged BIOS stored thereon to another flash memory with an (undamaged) BIOS in order for the computer system to resume normal operations. The abovementioned approach of replacing the flash memory, however, requires the user to remove the casing of the computer system and put the new flash memory on the motherboard, possibly resulting in damage to the entire memory if the pins of the flash memory are not inserted in the correct positions.
Many manufacturers have so far proposed methods to prevent a computer system from failing to boot due to a BIOS damage. One of the methods is to dispose two flash memories, both containing the BIOS, on the motherboard. Thus, when one of the BIOS's is damaged at update, the user may switch a jumper on the motherboard so that the computer system may use the other BIOS at booting. However, the method results in an increase in the cost and area of the motherboard. In addition, the user has to remove the casing of the computer to switch the jumper. Furthermore, some manufacturers additionally dispose an automatic detection circuit and two flash memories to store the BIOS's. When the automatic detection circuit detects that one of the BIOS's is damaged, operation is automatically switched to the other BIOS so that the computer system may maintain normal operation. However, the method, though, frees the user from having to remove the computer casing but adds a detection circuit and a flash memory to the motherboard, thereby increasing the cost and area of the motherboard.